import { dirname, resolve } from 'path'
import { fileURLToPath, URL } from 'url'

export const dirCurrent = (url: string | URL) => dirname(fileURLToPath(url))

export const dirLib = dirname(fileURLToPath(import.meta.url))
export const dirProject = resolve(dirLib, '..')

export const dirConfig = resolve(dirProject, 'config')
export const dirLog = resolve(dirProject, 'log')
